package com.lfc.observer;

public class ConcreteSubject extends Subject {
    private String state;

    public String getState() {
        return state;
    }
    public void change(String newState){
        state=newState;
//        System.out.println("获取主题颜色");
        // 状态发生改变通知各个观察者
        this.notifyObserver(state);
    }
    public void change1(String newState){
        state=newState;
        System.out.println("主题状态"+state);
        this.notifyObserver();
    }
}
